<include file="public@header"/>
</head>
<body>
<div class="layui-fluid js-check-wrap">
        <form action="{:url('AuditFlowStep/editPost')}" method="post" class="layui-form js-ajax-form margin-top-20">
        <div class="smart-widget widget-blue">
            <div class="layui-card">
                <div class="layui-card-header">{:lang('ADMIN_AUDITFLOWSTEP_EDIT')}</div>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <label class="layui-col-sm2 control-label">{:lang('AUDIT_FLOW_STEP_NAME')}</label>
                        <div class="col-md-6 layui-col-sm10">
                            <input type="text" class="layui-input" name="step_name" required value="{$result.step_name}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-col-sm2 control-label">{:lang('AUDIT_FLOW_STEP_AUTH')}</label>
                        <div class="col-md-6 layui-col-sm10">
                            <div class="checkbox">
                                <foreach name="role_list" item="item">
                                    <div class="inline-block" style="min-width:180px;">
                                        <div class="custom-checkbox">
                                            <input type="checkbox" id="auth_role_id_{$item.id}" name="auth_role_id[]" value="{$item.id}" {$item.checked}>
                                            <label for="auth_role_id_{$item.id}"></label>
                                        </div>
                                        <div class="inline-block vertical-top">{$item.name}</div>
                                    </div>
                                </foreach>
                            </div>
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="step_id" value="{$result[step_id]}">
                            <input type="hidden" name="audit_id" value="{$result[audit_id]}">
                            <if condition="cmf_auth_check(cmf_get_current_admin_id(), 'admin/AuditFlowStep/editPost')">
                                <button type="submit" class="layui-btn layui-btn-normal js-ajax-submit">{:lang('SAVE')}</button>
                            </if>
                            <a class="layui-btn layui-btn-primary" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
